﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LumiSoft.Net.Media.Codec;
using LumiSoft.Net.Media.Codec.Audio;

namespace TEL.WinMediaWPF.Audio
{
    public  class TE101Codec : Codec
    {
        public TE101Codec()
        {
        }

        #region Overrides of Codec

        public override byte[] Encode(byte[] buffer, int offset, int count)
        {
            byte[] res = new byte[164];
            res[0] = buffer[offset];
            if (buffer[offset + 1] == 0) res[1] = 10; else res[1] = 138;
            res[2] = 0;
            res[3] = 160;
            
            return res;
        }

        public override byte[] Decode(byte[] buffer, int offset, int count)
        {
            throw new NotImplementedException();
        }

        public override string Name
        {
            get {return "101 telephone-event/8000"; }
        }

        #endregion
    }
}
